<?php
    
    $name = $column->getName();
    $on = isset($column->config['options']['on']) ? $column->config['options']['on'] : 'backend::lang.form.field_on';
    $off = isset($column->config['options']['off']) ? $column->config['options']['off'] : 'backend::lang.form.field_off';
    $key = $record->getKeyName();
?>

    <label class="custom-switch" onchange="onlistUpdate($('#<?= $column->getId().'-'.$record->id ?>'))">
    <input type="checkbox"
           parimy-key = "<?= $record->getKeyName() ?>"
           id="<?= $column->getId().'-'.$record->id ?>" name="<?= $name ?>"
           value='{"<?= $key ?>":<?= $record->$key ?>, "<?= $name ?>":<?= $record->$name ?>}'
           <?= $record->$name == 0 ? '' : 'checked="checked"' ?>
        />
    <span><span><?= e(trans($on)) ?></span><span><?= e(trans($off)) ?></span></span>
    <a class="slide-button"></a>
</label>